m = 0
while m != 'Q':
    m = input("import PM2.5 number:")
    if m == 'Q':
        break
    pm = int(m)
    if 0 <= pm <= 50:
        print("空气状况优")
    elif 51 <= pm <= 100:
        print("空气状况良")
    elif 101 <= pm <= 150:
        print("空气状况轻度污染")
    elif 151 <= pm <= 200:
        print("空气状况中度污染")
    elif 201 <= pm <= 250:
        print("空气状况重度污染")
    elif 251 <= pm <= 300:
        print("空气状况严重污染")
    else:
        print("输入有误，请重新输入")

print("成功退出")
